<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script src="/static/buyer/js/jquery.min.js"></script>
    <script src="/static/buyer/js/vue.min.js"></script>
</head>
<body>
<h1>vue test</h1>
{# 告诉django 不要解析里面的内容 #}
{% verbatim %}
<div id="app">
    {{ msg }} <br/>
    <ul>
        <li v-for="goods in goodsList">{{ goods }}</li>
    </ul>
    <a v-bind:href="url">点我啊</a> <br/>
    <button v-on:click="btn(12)">点我啊</button>
</div>
{% endverbatim %}
</body>
<script>
    $(function () {
        new Vue({
            el: "#app",
            data: {
                msg: 'hello vue',
                goodsList: ['苹果', '香蕉', '猕猴桃'],
                url: 'http://www.baidu.com',
            },
            //delimiters: ['{[', ']}'],
            methods: {
                btn: function (result) {
                    alert(result);
                    {#alert('我是弹框...');#}
                }
            },
            created: function () {
                alert('create...')
            }
        })
    });


</script>

</html>